Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 8 - Video Digitizer Components


Using Video Digitizer Components

This section describes how you can control a video digitizer component. It has been divided into the following topics:

Specifying Destinations

Video digitizer components provide several functions that allow applications to specify the destination for the digitized video stream produced by the digitizer component. You have two options for specifying the destination for the video data stream in your application.

The first option requires that the video be digitized as RGB pixels and placed into a destination pixel map. This option allows the video to be placed either onscreen or offscreen, depending upon the placement of the pixel map. Your application can use the VDSetPlayThruDestination function (described on page 8-35) to set the characteristics for this option. Your application can use the VDPreflightDestination function (described on page 8-36) to determine the capabilities of the digitizer. All video digitizer components must support this option.

The second option uses a global boundary rectangle to define the destination for the video. This option always results in onscreen images and is useful with digitizers that support hardware direct memory access (DMA) across multiple screens. The digitizer component is responsible for any required color depth conversions, image clipping and resizing, and so on. Your application can use the VDSetPlayThruGlobalRect function (described on page 8-39) to set the characteristics for this option. Your application can use the VDPreflightGlobalRect function (described on page 8-40) to determine the capabilities of the digitizer. Not all video digitizer components support this option.

Starting and Stopping the Digitizer

You can control digitization on a frame-by-frame basis in your application. The VDGrabOneFrame function (described on page 8-54) digitizes a single video frame. All video digitizer components support this function.

Alternatively, you can use the VDSetPlayThruOnOff function (described on page 8-53) to enable or disable digitization. When digitization is enabled, the video digitizer component places video into the specified destination continuously. The application stops the digitizer by disabling digitization. This function can be used with both destination options. However, not all video digitizer components support this function.

Multiple Buffering

You can improve the performance of frame-by-frame digitization by using
multiple destination buffers for the digitized video. Your application defines a number of destination buffers to the video digitizer component and specifies the order in which those buffers are to be used. The digitizer component then fills the buffers, allowing you to switch between the buffers more quickly than your application otherwise could. In this manner, you can grab a video sequence at a higher rate with less chance of data loss. This technique can be used with both destination options.

You define the buffers to the digitizer by calling the VDSetupBuffers function (described on page 8-54). The VDGrabOneFrameAsync function (described on page 8-56) starts the process of grabbing a single video frame. The VDDone function (described on page 8-58) allows you to determine when the digitizer component has finished a given frame.

Obtaining an Accurate Time of Frame Capture

The sequence grabber typically gives video digitizers a time base so your application can obtain an accurate time for the capture of any given frame. Applications can set the digitizer's time base by calling the VDSetTimeBase function, which is described on page 8-51.


Subtopics
Specifying Destinations
Starting and Stopping the Digitizer
Multiple Buffering
Obtaining an Accurate Time of Frame Capture

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help